package com.xyy.saas.payment.util.retry;

import com.xyy.saas.payment.trace.AlarmService;
import com.xyy.saas.payment.util.SpringUtils;

/**
 * @author wangzeqi
 */
public class RetryStrategy {

    private static final AlarmService alarmService = SpringUtils.getBean(AlarmService.class);

    public static final ExponentialBackoffRetryWithJitter RETRY_2_ATTEMPTS = new ExponentialBackoffRetryWithJitter(3000, 2.0, 60000, 2, alarmService);
    public static final ExponentialBackoffRetryWithJitter RETRY_3_ATTEMPTS = new ExponentialBackoffRetryWithJitter(3000, 2.0, 60000, 3, alarmService);
    public static final ExponentialBackoffRetryWithJitter RETRY_4_ATTEMPTS = new ExponentialBackoffRetryWithJitter(3000, 2.0, 60000, 4, alarmService);

}
